var DataGridColumn = function() {
    /***
     *@private
     */
    this.grid = new DataGrid();
    /***
     *@private
     */
    this.element = new Object();
    /**
     *@private
     */
    this.labelFunction = function(item, column) {
        return this.grid.labelFunction(item,column);
    }

    this.dataField = "label";
    this.width = 300;
    this.headerText = "Column";
    this.name = "Column";
    this.align = DataGridColumnAlign.left;

    this.setDatafield = function(value) {
        this.dataField = value;
    }

    this.setWidth = function (width) {
        this.width = width;
    }

    this.setHeadertext = function (text) {
        this.headerText = text;
    }

    this.setGrid = function(grid) {
        this.grid = grid;
    }

    this.setAlign = function(value) {
        this.align = value;
    }

    this.setLabelfunction = function(func) {
        this.labelFunction = (func instanceof Function)  ? func : eval(func);
    }
};

var DataGridColumnAlign = {
    left : "left",
    right : "right",
    center : "center"
}